package me.muci.B_threadMethods.JoinTest;

/**
 * ClassName: ThreadA <br/>
 * Description: <br/>
 * date: 2021/8/9 11:42<br/>
 *
 * @author muci<br />
 * @description
 * @since JDK 1.8
 */
public class ThreadB extends Thread{

    private ThreadA a;

    public ThreadB(ThreadA a) {
        this.a = a;
    }

    @Override
    public void run() {
        try {
            a.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("B");
    }
}
